﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Editor.cs" company="GT">
//   Gunther Taborga
// </copyright>
// <summary>
//   Defines the BatchId3EditorModule type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace BatchID3.Editor.Ioc
{
    using BatchID3.Editor.Dialogs;
    using BatchID3.Editor.Plugins;

    using Ninject.Modules;

    public class Editor : NinjectModule
    {
        public override void Load()
        {
            // Dialog Factories
            this.Bind<IFolderBrowserDialogFactory>().To<FolderBrowserDialogFactory>().InSingletonScope();
            this.Bind<IOpenFileDialogFactory>().To<OpenFileDialogFactory>().InSingletonScope();
            this.Bind<IRenameDialogFactory>().To<RenameDialogFactory>().InSingletonScope();
            this.Bind<ISortDialogFactory>().To<SortDialogFactory>().InSingletonScope();
            this.Bind<ISetTagDialogFactory>().To<SetTagDialogFactory>().InSingletonScope();

            // Windows & Dialogs
            this.Bind<IWindow>().To<MainWindow>();
            this.Bind<IFolderBrowserDialog>().To<FolderBrowserDialog>();
            this.Bind<IOpenFileDialog>().To<OpenFileDialog>();
            this.Bind<IRenameDialog>().To<RenameDialog>();
            this.Bind<ISortDialog>().To<SortDialog>();
            this.Bind<ISetTagDialog>().To<SetTagDialog>();

            // Plugins
            this.Bind<IWinamp>().To<Winamp>();
        }
    }
}